www.gusucode.com > HCONLY站长管理助手 V1.3 > HCONLY站长管理助手 V1.3\code\config\conn.asp
<% '***************连接数据库******************* 'on error resume next Set Conn= Server.CreateObject("ADODB.Connection") Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(DataFile) Conn.Open If Err Then err.Clear Set Conn = Nothing Response.Write("<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" /><div style='font-size:12px;font-weight:bold;border:1px solid #006;padding:6px;background:#fcc'>数据库连接出错,请检查连接字串!</div>") Response.End end if %>